package com.example.hrsystem.workflow.model;

import androidx.room.Entity;
import androidx.room.TypeConverters;

import com.example.hrsystem.data.source.DateTypeConverters;

import java.util.Date;

/**
 * 出差申请实体类
 * 继承自ApprovalRequest，包含出差特有的属性
 */
@Entity(tableName = "business_trip_requests")
public class BusinessTripRequest extends ApprovalRequest {
    // 出差目的地
    private String destination;

    // 出差开始时间
    @TypeConverters(DateTypeConverters.class)
    private Date startTime;

    // 出差结束时间
    @TypeConverters(DateTypeConverters.class)
    private Date endTime;

    // 出差天数
    private float days;

    // 出差事由
    private String purpose;

    // 预计费用
    private double estimatedCost;

    // 审批人ID
    private Integer approverId;

    // 审批意见
    private String approvalComment;

    // Getter和Setter方法
    public String getDestination() {
        return destination;
    }

    public void setDestination(String destination) {
        this.destination = destination;
    }

    public Date getStartTime() {
        return startTime;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    public float getDays() {
        return days;
    }

    public void setDays(float days) {
        this.days = days;
    }

    public String getPurpose() {
        return purpose;
    }

    public void setPurpose(String purpose) {
        this.purpose = purpose;
    }

    public double getEstimatedCost() {
        return estimatedCost;
    }

    public void setEstimatedCost(double estimatedCost) {
        this.estimatedCost = estimatedCost;
    }

    public Integer getApproverId() {
        return approverId;
    }

    public void setApproverId(Integer approverId) {
        this.approverId = approverId;
    }

    public String getApprovalComment() {
        return approvalComment;
    }

    public void setApprovalComment(String approvalComment) {
        this.approvalComment = approvalComment;
    }
}